package org.dao.imp;

import java.util.List;

import org.dao.ZyDao;
import org.model.Xsb;
import org.model.Zyb;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class ZyDaoImp extends HibernateDaoSupport implements ZyDao {

	@Override
	public Zyb getOneZy(Integer zyId) {
		List list = getHibernateTemplate().find("from Zyb where id=?",zyId);
		if(list.size()>0)
			return (Zyb) list.get(0);
		else
			return null;
	}

	@Override
	public List getAll() {
		List list = getHibernateTemplate().find("from Zyb");
		return list;
	}

}
